package com.youkeyi.ddy.cloud.basic.storage.stock.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

/**
 * <p>
 * 库存操作日志
 * </p>
 *
 * @author xiawang.liu
 * @since 2024-03-26
 */
@TableName("sto_stock_option_log")
public class StoStockOptionLog extends Model<StoStockOptionLog> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("primary_key")
    private String primaryKey;

    /**
     * 解决并发更新问题,每次更新需要用 uuid 做比较判断数据是否已变更
     */
    @TableField("uuid")
    private String uuid;

    /**
     * 旧的uuid,mybatis 更新时需要
     */
    @TableField("old_uuid")
    private String oldUuid;

    /**
     * 归属主体Id
     */
    @TableField("corp_key")
    private String corpKey;

    /**
     * 单据编号
     */
    @TableField("bill_no")
    private String billNo;

    /**
     * 仓库Id
     */
    @TableField("warehouse_key")
    private String warehouseKey;

    /**
     * 仓库名称
     */
    @TableField("warehouse_name")
    private String warehouseName;

    /**
     * 商品条形码
     */
    @TableField("bar_code")
    private String barCode;

    /**
     * 商品Id
     */
    @TableField("goods_key")
    private String goodsKey;

    /**
     * 商品名称
     */
    @TableField("goods_name")
    private String goodsName;

    /**
     * 关键字 供前端查询
     */
    @TableField("key_word")
    private String keyWord;

    /**
     * 单位Id
     */
    @TableField("unit_key")
    private String unitKey;

    /**
     * 单位名称
     */
    @TableField("unit_name")
    private String unitName;

    /**
     * 生产日期
     */
    @TableField("product_date")
    private Date productDate;

    /**
     * 失效日期
     */
    @TableField("expiration_date")
    private Date expirationDate;

    /**
     * 货架Id
     */
    @TableField("shelf_key")
    private String shelfKey;

    /**
     * 数量
     */
    @TableField("quantity")
    private BigDecimal quantity;

    /**
     * 入库成本价
     */
    @TableField("price")
    private BigDecimal price;

    /**
     * 建议售价
     */
    @TableField("advice_price")
    private BigDecimal advicePrice;

    /**
     * 供应商Id
     */
    @TableField("supplier_key")
    private String supplierKey;

    /**
     * 供应商名称
     */
    @TableField("supplier_name")
    private String supplierName;

    /**
     * 入库类型 (0 采购入库 1 调拨入库 2 销售退货入库 3 调拨退货入库 4盘盈入库)
     */
    @TableField("in_store_type")
    private Integer inStoreType;

    /**
     * 状态 (1 已入库 2 预出库)
     */
    @TableField("state")
    private Integer state;

    /**
     * 合作方式
     */
    @TableField("cooperation_mode")
    private Integer cooperationMode;

    /**
     * 源库存Id
     */
    @TableField("orig_stock_key")
    private String origStockKey;

    /**
     * 备注
     */
    @TableField("notes")
    private String notes;

    /**
     * 操作来源 minApp(小程序)、webApp(web端)、app(app端)
     */
    @TableField("from_type")
    private String fromType;

    /**
     * 支付方式 (1 现结 2 月结 3 铺货)
     */
    @TableField("pay_type")
    private Integer payType;

    /**
     * 采购人
     */
    @TableField("purchase_user_key")
    private String purchaseUserKey;

    /**
     * 入库人Id
     */
    @TableField("storage_user_key")
    private String storageUserKey;

    /**
     * 入库时间
     */
    @TableField("storage_time")
    private Date storageTime;

    /**
     * 操作人Id
     */
    @TableField("option_user_key")
    private String optionUserKey;

    /**
     * 插入类型 (0 insert 1 update 2 delete)
     */
    @TableField("insert_type")
    private Integer insertType;

    /**
     * 插入前状态 
     */
    @TableField("pre_state")
    private Integer preState;

    /**
     * 插入前数量
     */
    @TableField("pre_quantity")
    private BigDecimal preQuantity;

    /**
     * 插入前成本价
     */
    @TableField("pre_price")
    private BigDecimal prePrice;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

    /**
     * 创建人
     */
    @TableField("create_user_key")
    private String createUserKey;

    /**
     * 创建人名称
     */
    @TableField("create_user_name")
    private String createUserName;

    /**
     * 更新人
     */
    @TableField("update_time")
    private Date updateTime;

    /**
     * 更新人
     */
    @TableField("update_user_key")
    private String updateUserKey;

    /**
     * 更新人名称
     */
    @TableField("update_user_name")
    private String updateUserName;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getPrimaryKey() {
        return primaryKey;
    }

    public void setPrimaryKey(String primaryKey) {
        this.primaryKey = primaryKey;
    }
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }
    public String getOldUuid() {
        return oldUuid;
    }

    public void setOldUuid(String oldUuid) {
        this.oldUuid = oldUuid;
    }
    public String getCorpKey() {
        return corpKey;
    }

    public void setCorpKey(String corpKey) {
        this.corpKey = corpKey;
    }
    public String getBillNo() {
        return billNo;
    }

    public void setBillNo(String billNo) {
        this.billNo = billNo;
    }
    public String getWarehouseKey() {
        return warehouseKey;
    }

    public void setWarehouseKey(String warehouseKey) {
        this.warehouseKey = warehouseKey;
    }
    public String getWarehouseName() {
        return warehouseName;
    }

    public void setWarehouseName(String warehouseName) {
        this.warehouseName = warehouseName;
    }
    public String getBarCode() {
        return barCode;
    }

    public void setBarCode(String barCode) {
        this.barCode = barCode;
    }
    public String getGoodsKey() {
        return goodsKey;
    }

    public void setGoodsKey(String goodsKey) {
        this.goodsKey = goodsKey;
    }
    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }
    public String getKeyWord() {
        return keyWord;
    }

    public void setKeyWord(String keyWord) {
        this.keyWord = keyWord;
    }
    public String getUnitKey() {
        return unitKey;
    }

    public void setUnitKey(String unitKey) {
        this.unitKey = unitKey;
    }
    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }
    public Date getProductDate() {
        return productDate;
    }

    public void setProductDate(Date productDate) {
        this.productDate = productDate;
    }
    public Date getExpirationDate() {
        return expirationDate;
    }

    public void setExpirationDate(Date expirationDate) {
        this.expirationDate = expirationDate;
    }
    public String getShelfKey() {
        return shelfKey;
    }

    public void setShelfKey(String shelfKey) {
        this.shelfKey = shelfKey;
    }
    public BigDecimal getQuantity() {
        return quantity;
    }

    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }
    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }
    public BigDecimal getAdvicePrice() {
        return advicePrice;
    }

    public void setAdvicePrice(BigDecimal advicePrice) {
        this.advicePrice = advicePrice;
    }
    public String getSupplierKey() {
        return supplierKey;
    }

    public void setSupplierKey(String supplierKey) {
        this.supplierKey = supplierKey;
    }
    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }
    public Integer getInStoreType() {
        return inStoreType;
    }

    public void setInStoreType(Integer inStoreType) {
        this.inStoreType = inStoreType;
    }
    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }
    public Integer getCooperationMode() {
        return cooperationMode;
    }

    public void setCooperationMode(Integer cooperationMode) {
        this.cooperationMode = cooperationMode;
    }
    public String getOrigStockKey() {
        return origStockKey;
    }

    public void setOrigStockKey(String origStockKey) {
        this.origStockKey = origStockKey;
    }
    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }
    public String getFromType() {
        return fromType;
    }

    public void setFromType(String fromType) {
        this.fromType = fromType;
    }
    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }
    public String getPurchaseUserKey() {
        return purchaseUserKey;
    }

    public void setPurchaseUserKey(String purchaseUserKey) {
        this.purchaseUserKey = purchaseUserKey;
    }
    public String getStorageUserKey() {
        return storageUserKey;
    }

    public void setStorageUserKey(String storageUserKey) {
        this.storageUserKey = storageUserKey;
    }
    public Date getStorageTime() {
        return storageTime;
    }

    public void setStorageTime(Date storageTime) {
        this.storageTime = storageTime;
    }
    public String getOptionUserKey() {
        return optionUserKey;
    }

    public void setOptionUserKey(String optionUserKey) {
        this.optionUserKey = optionUserKey;
    }
    public Integer getInsertType() {
        return insertType;
    }

    public void setInsertType(Integer insertType) {
        this.insertType = insertType;
    }
    public Integer getPreState() {
        return preState;
    }

    public void setPreState(Integer preState) {
        this.preState = preState;
    }
    public BigDecimal getPreQuantity() {
        return preQuantity;
    }

    public void setPreQuantity(BigDecimal preQuantity) {
        this.preQuantity = preQuantity;
    }
    public BigDecimal getPrePrice() {
        return prePrice;
    }

    public void setPrePrice(BigDecimal prePrice) {
        this.prePrice = prePrice;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public String getCreateUserKey() {
        return createUserKey;
    }

    public void setCreateUserKey(String createUserKey) {
        this.createUserKey = createUserKey;
    }
    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public String getUpdateUserKey() {
        return updateUserKey;
    }

    public void setUpdateUserKey(String updateUserKey) {
        this.updateUserKey = updateUserKey;
    }
    public String getUpdateUserName() {
        return updateUserName;
    }

    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "StoStockOptionLog{" +
            "id=" + id +
            ", primaryKey=" + primaryKey +
            ", uuid=" + uuid +
            ", oldUuid=" + oldUuid +
            ", corpKey=" + corpKey +
            ", billNo=" + billNo +
            ", warehouseKey=" + warehouseKey +
            ", warehouseName=" + warehouseName +
            ", barCode=" + barCode +
            ", goodsKey=" + goodsKey +
            ", goodsName=" + goodsName +
            ", keyWord=" + keyWord +
            ", unitKey=" + unitKey +
            ", unitName=" + unitName +
            ", productDate=" + productDate +
            ", expirationDate=" + expirationDate +
            ", shelfKey=" + shelfKey +
            ", quantity=" + quantity +
            ", price=" + price +
            ", advicePrice=" + advicePrice +
            ", supplierKey=" + supplierKey +
            ", supplierName=" + supplierName +
            ", inStoreType=" + inStoreType +
            ", state=" + state +
            ", cooperationMode=" + cooperationMode +
            ", origStockKey=" + origStockKey +
            ", notes=" + notes +
            ", fromType=" + fromType +
            ", payType=" + payType +
            ", purchaseUserKey=" + purchaseUserKey +
            ", storageUserKey=" + storageUserKey +
            ", storageTime=" + storageTime +
            ", optionUserKey=" + optionUserKey +
            ", insertType=" + insertType +
            ", preState=" + preState +
            ", preQuantity=" + preQuantity +
            ", prePrice=" + prePrice +
            ", createTime=" + createTime +
            ", createUserKey=" + createUserKey +
            ", createUserName=" + createUserName +
            ", updateTime=" + updateTime +
            ", updateUserKey=" + updateUserKey +
            ", updateUserName=" + updateUserName +
        "}";
    }
}
